<div class="main-div">
    <form action="/admin/articlecat/add" method="post" id="formID">
        <input type="hidden" name="uri" value="<?php echo $this->uri;?>" />
        <input type="hidden" name="act" value="<?php echo $this->catInfo['act'] ? 'save' : '';?>" />
        <input type="hidden" name="cat_id" value="<?php echo $this->catInfo['cat_id'];?>" />
        <input type="hidden" name="this_url" value="<?php echo $this->thisUrl;?>" />
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="22%" height="30" align="right">分类名称</td>
                <td width="78%"><label><span><input class="validate[required,length[2,15]] text-input" name="cat_name" value="<?php echo $this->catInfo['cat_name']; ?>" type="text" id="cat_name" /></span></label><span class="red">*</span></td>
            </tr>
            <tr>
                <td height="30" align="right">上级分类</td>
                <td>
                    <select name="parentid" id="parentid">
                        <option value="0">顶级分类</option>
                        <?php
                        foreach ($this->catlist as $cat):
                            echo '<option value="'. $cat['cat_id'] .'"';
                            echo isset($this->catInfo['parentid']) && $this->catInfo['parentid'] == $cat['cat_id'] ? 'selected' : '';
                            echo  '>';
                            echo str_repeat('&nbsp;', $cat['level'] * 2) . $cat['cat_name'] .'</option>';
                        endforeach
                        ?>
                        
                    </select>
                    <span class="red">*</span></td>
            </tr>
            <tr>
                <td height="30" align="right">关键字</td>
                <td><input class="text-input" name="keywords" type="text" id="keywords" value="<?php echo $this->catInfo['keywords']; ?>" /></td>
            </tr>
            <tr>
                <td height="30" align="right" valign="top">描述</td>
                <td><textarea name="desc" cols="40" rows="5" id="desc"><?php echo isset($this->catInfo['desc']) ? $this->catInfo['desc'] : ''; ?></textarea></td>
            </tr>
            <tr>
                <td height="63" align="right">&nbsp;</td>
                <td><input type="submit" name="Submit" value="确认" class="button" />
                    &nbsp;&nbsp; <input type="reset" name="Submit2" value="重置" class="button" /></td>
            </tr>
            <tr>
                <td height="30">&nbsp;</td>
                <td>&nbsp;<span class="red"></span></td>
            </tr>
        </table>
    </form>
</div>

